#import "ArtistryZealController.h"
        
#import "ArtistryZealModel.h"
#import "ArtistryZealCell.h"
#import "Masonry.h"

@interface ArtistryZealController () <UICollectionViewDataSource, UICollectionViewDelegate>

@property (nonatomic, strong) UICollectionView *nostalgiaCollectionView;
@property (nonatomic, strong) NSMutableArray *nostalgiaJoyousHammerDataSource;

@end

@implementation ArtistryZealController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self vortexConfiglayout];
	[self naturalHeatwaveXylophoneloadData];
}


//: 懒加载数据模型数组
- (NSMutableArray *)nostalgiaJoyousHammerDataSource {
	if (!_nostalgiaJoyousHammerDataSource) {
		_nostalgiaJoyousHammerDataSource = [NSMutableArray array];
	}
	return _nostalgiaJoyousHammerDataSource;
}

- (void)vortexConfiglayout {
    UICollectionViewFlowLayout *kingdomKeepsakeWindfall = [[UICollectionViewFlowLayout alloc] init];
    kingdomKeepsakeWindfall.minimumLineSpacing = 10;
    kingdomKeepsakeWindfall.minimumInteritemSpacing = 10;
    kingdomKeepsakeWindfall.itemSize = CGSizeMake(100, 100);
    kingdomKeepsakeWindfall.scrollDirection = UICollectionViewScrollDirectionVertical;
    
    self.nostalgiaCollectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:kingdomKeepsakeWindfall];
    self.nostalgiaCollectionView.backgroundColor = UIColor.clearColor;
    self.nostalgiaCollectionView.delegate = self;
    self.nostalgiaCollectionView.dataSource = self;
    self.nostalgiaCollectionView.showsHorizontalScrollIndicator = NO;
    self.nostalgiaCollectionView.showsVerticalScrollIndicator = NO;
    [self.nostalgiaCollectionView registerClass:[ArtistryZealCell class] forCellWithReuseIdentifier:NSStringFromClass([ArtistryZealCell class])];
    
    [self.view addSubview:self.nostalgiaCollectionView];
    [self.nostalgiaCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.view);
    }];
}

//: 获取数据模型
- (void)naturalHeatwaveXylophoneloadData {
	
}

#pragma mark - UICollectionView DataSource
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
    return self.nostalgiaJoyousHammerDataSource.count;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    ArtistryZealCell *circulate = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([ArtistryZealCell class]) forIndexPath:indexPath];
    return circulate;
}

#pragma mark - UICollectionView Delegate
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
    //: collectioncell 点击
}


@end
